package cn.itsource.romate.impl;


import cn.itsource.pojo.bo.RuleStartBo;
import cn.itsource.pojo.dto.RuleStartDto;
import cn.itsource.pojo.dto.RuleWaitDto;
import cn.itsource.pojo.dto.SharingDto;
import cn.itsource.pojo.vo.SharingVo;
import cn.itsource.result.R;
import cn.itsource.romate.api.RuleApi;
import cn.itsource.service.IChargeRuleStartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * 📖：beishan
 * 🗓️：2024/4/10 18:22
 * =====================
 */
@RestController
public class RuleApiImpl implements RuleApi {

    @Autowired
    private IChargeRuleStartService chargeRuleStartService;




    @Override
    public RuleStartBo ruleStartAdvance(RuleStartDto ruleStartDto) {
        RuleStartBo startBo  = chargeRuleStartService.ruleStartAdvance(ruleStartDto);
        return startBo;

    }

    @Override
    public R<RuleWaitDto> ruleWait(Long moreData) {
        RuleWaitDto ruleWait = chargeRuleStartService.ruleWait(moreData);
        return R.success(ruleWait);
    }

    @Override
    public R<SharingVo> sharing(SharingDto sharingDto) {
        SharingVo sharing = chargeRuleStartService.sharing(sharingDto);
        return R.success(sharing);
    }

}
